#@adminLayout()

#define content()
<script src="/assets/live/live.js"></script>
<script src="/assets/layer/jquery-1.11.3.min.js"></script>
<script src="/assets/layui/layui.js"></script>
<link rel="stylesheet" href="/assets/layui/css/layui.css" media="all">

<style>
    .my-table {
        width: 100%;
        background-color: #fff;
        color: #666;
    }

    .my-table th {
        text-align: center;
        font-weight: 600;
    }

    .my-table td {
        text-align: center;
        font-weight: 200;
    }

    .my-table th, .my-table td {
        border-width: 1px;
        border-style: solid;
        border-color: #e6e6e6;
        padding-top: 8px;
        padding-bottom: 8px;
        height: 60px;
    }

    .my-table input {
        width: 60px;
        height: 28px;
        text-align: center;
    }

</style>

<!-- content start -->
<div class="admin-content">
    <div class="admin-content-body">
        <div class="am-cf am-padding am-padding-bottom-0">
            <div class="am-fl am-cf">
                <strong class="am-text-primary am-text-lg">#(date) 库存数据登记</strong>
            </div>
        </div>
        <hr>
        <div class="am-g">
            <div class="am-u-lg-10 am-u-sm-centered">
                <!--
                <table class="layui-table" lay-data="{url:'/assets/layui/demo1.json', id:'test3'}" lay-filter="test3">
                -->
                <table class="my-table">
                    <thead>
                        <tr>
                            <th rowspan="2">种类</th>
                            <th colspan="7" height="40px">HVAC222</th>
                            <th>ECM</th>
                            <th colspan="2">油冷</th>
                            <th colspan="2">GIC</th>
                        </tr>
                        <tr>
                            <th >MQB_B<br/>一区</th>
                            <th >MQB_B<br/>三区</th>
                            <th >C7<br/>三区</th>
                            <th >C7<br/>四区</th>
                            <th >136B<br/>手动</th>
                            <th >136B<br/>自动</th>
                            <th >136B<br/>手动</th>
                            <th >ECM</th>
                            <th >136B<br/>方壶</th>
                            <th >136B<br/>圆壶</th>
                            <th >MLB</th>
                            <th >MQB</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>社内在库</td>
                            <td><input type="text" value="500"></td>
                            <td><input type="text" value="300"></td>
                            <td><input type="text" value="500"></td>
                            <td><input type="text" value="300"></td>
                            <td><input type="text" value="500"></td>
                            <td><input type="text" value="300"></td>
                            <td><input type="text" value="500"></td>
                            <td><input type="text" value="300"></td>
                            <td><input type="text" value="500"></td>
                            <td><input type="text" value="300"></td>
                            <td><input type="text" value="500"></td>
                            <td><input type="text" value="300"></td>
                        </tr>
                        <tr>
                            <td>社内在库基准</td>
                            <td colspan="2">0.75日</td>
                            <td colspan="2">0.2日</td>
                            <td>0.4日</td>
                            <td>0.4日</td>
                            <td>0.4日</td>
                            <td>0.4日</td>
                            <td>0.4日</td>
                            <td>0.4日</td>
                            <td>8日</td>
                            <td>8日</td>
                        </tr>
                    </tbody>
                    <!--
                    <tbody>
                        <tr>
                            <td>社内在库数量<br/>(早8:00)</td>
                            <td>500</td>
                            <td>500</td>
                            <td>500</td>
                            <td>500</td>
                            <td>500</td>
                            <td>500</td>
                            <td>500</td>
                            <td>500</td>
                            <td>500</td>
                            <td>500</td>
                            <td>500</td>
                            <td>500</td>
                        </tr>
                    </tbody>
                    -->
                </table>
            </div>
        </div>
        <div class="am-g am-margin-top-xl">
            <div class="am-u-lg-4 am-u-lg-offset-5">
                <!--
                <button type="button" class="am-btn am-btn-primary">数据试算</button>
                -->
                <button type="button" class="am-btn am-btn-primary" onclick="mytest();">提交保存</button>
                <button type="button" class="am-btn am-btn-warning">重   置</button>
            </div>
        </div>

    </div>
</div>


<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
    layui.use('table', function(){
        var table = layui.table;

        //监听单元格编辑
        table.on('edit(my-table)', function(obj){
            var value = obj.value //得到修改后的值
                    ,data = obj.data //得到所在行所有键值
                    ,field = obj.field; //得到字段
            layer.msg('[ID: '+ data.id +'] ' + field + ' 字段更改为：'+ value);
        });
    });
</script>


<script src="/assets/layer/layer.js"></script>
<script type="text/javascript">
    function mytest() {
        //alert("hello");
        layer.msg('灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵活运用offset灵', {
            area: '100%',
            offset: 'b',
            time: 0,
        });
    }
</script>
<!-- content end -->
#end